/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmApproach extends BasicModel<PmApproach> {
  createDate?: string; // 创建时间
  name?: string; // 工程名称
  pcode?: string; // 工程编码
  delayedu?: string; // 延期时间
  launchpredate?: string; // 发送进场通知时间
  predate?: string; // 要求进场日期
  launchprewdate?: string; // 发送撤场通知时间
  prewithdrawdate?: string; // 要求撤场日期
  state?: number; // 状态
  scrapdate?: string; // 通知作废时间
  approachdate?: string; // 确认进场日期
  approachedu?: string; // 现场环境
  withdrawdate?: string; // 确认撤场日期
  withdrawedu?: string; // 撤场现场环境
  checkno?: string; // 审核人编码
  checker?: string; // 审核人
  checkdate?: string; // 审核时间
  approachremarks?: string; // 进场备注
}

export const pmApproachList = (params?: PmApproach | any) =>
  defHttp.get<PmApproach>({ url: adminPath + '/proj/enex/pmApproach/list', params });

export const pmApproachListData = (params?: PmApproach | any) =>
  defHttp.post<Page<PmApproach>>({ url: adminPath + '/proj/enex/pmApproach/listData', params });

export const pmApproachForm = (params?: PmApproach | any) =>
  defHttp.get<PmApproach>({ url: adminPath + '/proj/enex/pmApproach/form', params });

export const pmApproachSave = (params?: any, data?: PmApproach | any) =>
  defHttp.postJson<PmApproach>({ url: adminPath + '/proj/enex/pmApproach/save', params, data });

export const pmApproachDelete = (params?: PmApproach | any) =>
  defHttp.get<PmApproach>({ url: adminPath + '/proj/enex/pmApproach/delete', params });

export const pmApproachSengEnMsg = (params?: PmApproach | any) =>
  defHttp.post<Page<PmApproach>>({ url: adminPath + '/proj/enex/pmApproach/sengEnMsg', params });

export const pmApproachSengExMsg = (params?: PmApproach | any) =>
  defHttp.post<Page<PmApproach>>({ url: adminPath + '/proj/enex/pmApproach/sengExMsg', params });

export const pmApproachValidEn = (params?: PmApproach | any) =>
  defHttp.post<Page<PmApproach>>({ url: adminPath + '/proj/enex/pmApproach/validEn', params });

export const pmApproachValidEx = (params?: PmApproach | any) =>
  defHttp.post<Page<PmApproach>>({ url: adminPath + '/proj/enex/pmApproach/validEx', params });